<template>
  <el-form class="right-event-reposts">
    <el-divider content-position="center">内容设置</el-divider>
    <el-button type="primary" @click.stop="onAddWbItem" class="margin-bottom-10 margin-left-right-16"><el-icon><i class="jy-icon-plus"></i></el-icon>增加内容</el-button>
    <el-collapse v-model="activeNames">
      <el-collapse-item v-for="(item, index) in eventWbLists" :name="index+1" :key="index">
        <template #title>博文{{index+1}}<i class="jy-icon-delete el-collapse-item__arrow" @click.stop="onDeleteWbItem($event, index)"></i>
        </template>
        <input-normal label="mid" v-model="item.mid" @change="onUpdateWbItem(index)"></input-normal>
        <input-normal label="图片地址" v-model="item.url" @change="onUpdateWbItem(index)"></input-normal>
        <textarea-normal label="博文内容" placeholder="通过mid可以自动获取内容，或默认内容，或样式调试" v-model="item.push_text" @change="onUpdateWbItem(index)"></textarea-normal>
      </el-collapse-item>
    </el-collapse>
  </el-form>
</template>
<script>
  import InputNormal from '@/views/components/edit/InputNormal.vue'
  import TextareaNormal from '@/views/components/edit/TextareaNormal.vue'
  import { addUtils } from '@/views/js/add-utils'

  export default {
    mixins: [addUtils],
    components: {
      InputNormal,
      TextareaNormal,
    },
  }
</script>
